Skip to content

Show most recent feedback first#91

Merged
nonprofittechy merged 8 commits into
mainfrom
improved-panel-viewing
May 19, 2026
Merged

Show most recent feedback first#91
nonprofittechy merged 8 commits into
mainfrom
improved-panel-viewing

Conversation

@nonprofittechy
Copy link
Copy Markdown
Member

@nonprofittechy nonprofittechy commented May 19, 2026

Fix #90

Some small changes:

  1. Sort feedback so most recently reviewed interview (and most recent feedback) is displayed first
  2. Stop using the "help" button for substantive information--this is hard to see and nonstandard. Move panelists to a tab.
  3. Make the feedback sections per-interview collapsible for easier scanning to find the feedback for a particular interview.

In order for tables to render properly in the collapsible div, needed to import markdown_to_html and render some HTML manually instead of relying on e.g., markdown table formatting

Fixed separate issue with pytest not being a dev dependency so could run tests

nonprofittechy and others added 6 commits May 18, 2026 17:01
- Move 'View Panelists' from help area to a proper tab in tabbed_templates_html
- Add subject field to view_panelists template for tab label
- Wrap each interview's feedback in a Bootstrap 5 collapse (expanded by default)
  so reviewers can collapse per-interview sections
- Sort open answer feedback in reverse chronological order (newest first)
- Convert markdown inside collapse divs to HTML (blockquote, hr, links)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Convert markdown table to HTML in reviews_table_template — markdown
  tables don't render after a block-level HTML element (collapse_template)
- Add ORDER BY datetime DESC to get_all_feedback_info query so reviews
  are sorted newest-first at the database level
- Since SQL now returns rows newest-first, inserting into the dict
  naturally orders interviews by their most recent review (first
  encounter per interview = most recent entry for that interview)
- Remove Python-side sort from text_reviews code block

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Uses ALToolbox's existing pdcaretopen/pdcaretclosed CSS pattern with
fa_icon caret-down (expanded) and caret-right (collapsed). Bootstrap
toggles the 'collapsed' class on the anchor automatically.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace ${ review['body'] } with ${ markdown_to_html(review['body']) }.
markdown_to_html() converts the body text (which may contain pipe tables,
code spans, etc.) to HTML during Mako evaluation — before the outer
Markdown pass runs. The resulting HTML is then embedded inside the
<blockquote> as raw HTML and passes through unchanged, bypassing the
md_in_html nesting limitation that prevents Markdown processing inside
block-level HTML elements without explicit markdown="1" attributes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Import from docassemble.base.filter and add to __all__ so the interview
namespace can resolve it when rendering feedback body content.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Wrap each interview section in <div class="al_collapse_template"> so
  ALToolbox's collapse_template.css selectors (.al_collapse_template a
  span.pdcaretopen/pdcaretclosed) apply — this fixes both icons showing
  simultaneously and styles the toggle link as a dashed-underline control
  (not a plain blue hyperlink)
- Replace <h3 class="h5 d-inline"> with <span class="subject h5"> so
  the title stays inline with the caret icon (h3 is block-level)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the feedback browsing admin page to make recent feedback easier to review and moves panelist information into the main tabbed UI.

Changes:

  • Sorts saved feedback sessions by newest feedback timestamp first.
  • Adds panelists as a third feedback tab instead of using help content.
  • Converts open-answer feedback into collapsible per-interview sections with HTML rendering.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docassemble/GithubFeedbackForm/feedback_on_server.py Adds newest-first ordering for feedback session retrieval and exposes Markdown rendering to interviews.
docassemble/GithubFeedbackForm/data/questions/browse_feedback_sessions.yml Updates the feedback summary UI with tabs, collapsible interview sections, and HTML table/link rendering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docassemble/GithubFeedbackForm/data/questions/browse_feedback_sessions.yml Outdated
nonprofittechy and others added 2 commits May 19, 2026 07:14
uv run pytest fails because pytest is not declared in [dependency-groups]
dev, so uv has no package to spawn.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@nonprofittechy nonprofittechy merged commit 44c251a into main May 19, 2026
6 checks passed
@nonprofittechy nonprofittechy deleted the improved-panel-viewing branch May 19, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sort text feedback from most recent to oldest

3 participants